package name.fowler.refactoring.simplestore.domain;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.NamedQuery;

@Entity
@NamedQuery(name = "movie.list", query = "select m from Movie m")
public class Movie extends JPAEntity{
	private String title;
    @Enumerated(value = EnumType.STRING)
	private PriceCodes priceCode;

    protected Movie() {
    }

    public Movie(String title, PriceCodes priceCode) {
		this.title = title;
		this.priceCode = priceCode;
	}

	public PriceCodes getPriceCode()	{
		return priceCode;
	}
	
	public void setPriceCode(PriceCodes value) {
		priceCode = value;
	}

	public String getTitle() {
		return title;
	}
}

